<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./msg.css">
  <style>
    #pop {
      border: 0 none;
      color: #fff;
      outline: none;
      padding: 10px 20px;
      font-size: 18px;
      background: #2594f0;
      cursor: pointer;
    }

    #pop:active {
      background: blue;
    }
  </style>
</head>

<body>
  <button id="pop">弹个框</button>
<!--
  <div class="msg__wrap">
    <div class="msg-header">
      <span>确认删除</span>
      <span class="msg-header-close-button">×</span>
    </div>
    <div class="msg-body">
      <div class="msg-body-icon">
        <div class="msg-body-icon-wrong"></div>
      </div>
      <div class="msg-body-content">是否删除</div>
    </div>
    <div class="msg-footer">
      <button class="msg-footer-btn msg-footer-cancel-button">算了吧</button>
      <button class="msg-footer-btn msg-footer-confirm-button">好的</button>
    </div>
  </div>
 -->
  <script src="./msg.js"></script>
  <script type="text/javascript">
    document.querySelector('#pop').addEventListener('click', function() {
      new $Msg({
        content: '贤者模式马上就过去了。。真的要清空吗？<span style="color: red;">~</span>',
        confirm: function(e) {
          console.log('confirm');
          console.log(this);
        },
        cancel: function(e) {
          console.log('cancel');
          console.log(this);
        },
        useHTML: true
      });
    });
  </script>
</body>

</html>